package com.smartleanx.module.hrm.dal.dataobject.payroll;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.smartleanx.framework.mybatis.core.type.EncryptTypeHandler;
import com.smartleanx.framework.tenant.core.db.TenantBaseDO;
import com.smartleanx.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
import com.smartleanx.module.hrm.dal.dataobject.TenantBoNew;
import com.smartleanx.module.hrm.eums.payroll.PayrollSendStatusEnum;
import lombok.*;

/**
 * 薪资详情 DO
 *
 * @author zhangchp
 */
@TableName(value = "hrm_payroll_detail", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PayrollDetailDO extends TenantBoNew {

    /**
     * 主键ID
     */
    @TableId
    private Long id;
    /**
     * 薪资月份ID
     */
    private Long payrollId;
    /**
     * 员工ID
     */
    private Long employeeId;
    /**
     * 员工工号
     */
    @TableField(exist = false)
    private String employeeNo;
    /**
     * 应出勤
     */
    private Double attendance;
    /**
     * 实际出勤
     */
    private Double actualAttendance;
    /**
     * 实发薪资
     */
    @TableField(typeHandler = EncryptTypeHandler.class)
    private String effectiveSalary;
    /**
     * 员工ID
     */
    private Long userId;
    /**
     * 部门ID
     */
    private Long deptId;
    /**
     * 审核结果
     *
     * 枚举 {@link BpmProcessInstanceStatusEnum}
     */
    private Integer approveResult;
    /**
     * 是否更新
     */
    private Boolean updated;
    /**
     * 发送状态
     *
     * 枚举 {@link PayrollSendStatusEnum}
     */
    private Integer sendStatus;
    /**
     * 查看状态
     */
    private Boolean readStatus;
    /**
     * 确认状态
     */
    private Boolean confirmStatus;
    /**
     * 员工反馈
     */
    private String feedback;
    /**
     * 是否已归档
     */
    private Boolean archived;
}